Skip to content

Add vendor-neutral HTTP OAuth and delegated token exchange - #4

Merged
markmnl merged 4 commits into
mainfrom
feature/http-oauth
Sep 17, 2026
Merged

markmnl merged 4 commits into
mainfrom
feature/http-oauth

Conversation

@markmnl

@markmnl markmnl commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Add optional HTTP OAuth so users can connect through their host's sign-in and consent flow without creating an fmsg API key. API-key HTTP and stdio remain the default. The Web API continues to enforce messaging visibility, recipients, grants and quotas.

The server publishes protected-resource metadata, discovers the configured issuer's OAuth JWKS, validates incoming EdDSA access tokens for the exact MCP resource, and checks messaging scopes before dispatch. It uses authenticated RFC 8693 exchange for a separate Web API token, with no incoming-token forwarding or X-FMSG-Act-As. Caches are isolated per incoming token and capped at five minutes and both token lifetimes. Waits renew expiring sockets and catch up within their original cursor and deadline.

Authentication failures produce 401/403 challenges; exchange configuration errors produce 5xx and sanitized operator-action logs. If a wait has already streamed progress, a later auth failure finishes as an MCP error and the next request receives the challenge. Operator documentation covers vendor-neutral setup, client registration options, TLS metadata routing and revocation limits.

Validation: typecheck, build, 127 tests (including 26 signed-token OAuth cases), and npm package preview. Tests cover invalid claims, key rotation, scopes, exchange fields, token isolation, revocation, reconnects and cancellation. The fake Web API accepts registered token fixtures; actual hosted-client and deployed IdP/Web API acceptance remain rollout checks. CI passes on the final commit: Node 22/24, Docker image and real two-host API-key acceptance. No deployment or release is included.

@markmnl
markmnl merged commit a6dce3e into main Sep 17, 2026
4 checks passed
@markmnl
markmnl deleted the feature/http-oauth branch September 17, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant